package com.gagakuai.bpm.utils;

import com.gagakuai.bpm.common.enums.BusinessCodeEnum;
import com.gagakuai.bpm.common.exception.BpmException;

/*
 * @program: bpm_server
 * @description: 断言工具类
 * @author: houhong
 * @create: 2022-06-27 10:50
 */
public class AssertUtils {


    public static void assertRetunTrue(Integer reslut) {

        if (0 != reslut) {
            throw new BpmException(BusinessCodeEnum.BPM_RETURN_LAST_STEP_FAILED);
        }

    }

    public static void assertWithDrawFailed(Integer reslut) {

        if (0 != reslut) {
            throw new BpmException(BusinessCodeEnum.BPM_WITH_DRAW_FAILED);
        }
    }





}